package com.panshi.service;

import com.panshi.vo.DataResult;
import com.panshi.vo.SysRole;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Component
@Api(tags = "role-后台role管理")
@FeignClient(value = "hasbei-sys-provider",contextId = "role")
 public interface IRoleApp {

    @ApiOperation("role-查询所有角色")
    @GetMapping("/role-app/list")
     DataResult find();

    @ApiOperation("role-增加角色")
    @PostMapping("/role-app/add")
     Boolean add(@RequestBody SysRole sysRole);

    @ApiOperation("role-删除角色")
    @GetMapping("/role-app/del/{id}")
     Boolean del(@PathVariable Integer id);

    @ApiOperation("role-根据id查询角色")
    @GetMapping("/role-app/byid/{id}")
     DataResult fidnRoleById(@PathVariable Integer id);

    @ApiOperation("role-修改角色")
    @PostMapping("/role-app/upd")
     Boolean upd(@RequestBody SysRole sysRole);

}
